﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ObserverSample
{
    abstract class AllyConrolCenter
    {
        protected string allyName; //队伍名字

        protected List<IObserver> players = new List<IObserver>();

        public void Jion(IObserver obs)
        {
            Console.WriteLine($"{obs.Name}加入{allyName}战队");
            players.Add(obs);

        }

        public void Quit(IObserver obs)
        {
            Console.WriteLine($"{obs.Name}离开{allyName}战队");
            players.Remove(obs);
        }

        public abstract void NoteifyOBsever(string name);
    }
}
